package day05;

import java.util.Arrays;

public class ArrayDemo5 {
    public static void main(String[] args) {
        int[] a={10,2,23,43,56};
        int[] b = Arrays.copyOf(a,6);
        for (int i=0;i<b.length;i++){
            System.out.println(b[i]);
        }
        System.out.println("-------------------");
        a=Arrays.copyOf(a,a.length+1);
        for (int i=0;i<a.length;i++){
            System.out.println(a[i]);
        }
    }
}